<html version="-//W3C//DTD HTML 4.01 Transitional//EN" lang="UTF-8">
<head>
	<style>body,td,a,p,.h{font-family:arial,sans-serif;font-size:13px}</style>
	<title>我的标签云设置</title>
	<link rel=stylesheet type=text/css href="/ilib/ilib/style/main.css">

<!-- new -->
	<link rel="stylesheet" type="text/css" href="/ilib/ilib/js/calendar/css/iframe.css" media="screen">
	<link rel="stylesheet" type="text/css" href="/ilib/ilib/js/calendar/css/calendar.css">
	<script type="text/javascript" src="/ilib/ilib/js/calendar/mootools.js"></script>
  	<script type="text/javascript" src="/ilib/ilib/js/calendar/calendar.js"></script>
  	<script type="text/javascript">
    	window.addEvent(
    		'domready', 
    		function() { 
    			myCal1 = new Calendar({ sel1: 'Y-m-d' }, { direction: -1, pad: 2, tweak: {x: 0, y: 0} });
    			myCal2 = new Calendar({ sel12: 'Y-m-d' }, { direction: -1, pad: 2, tweak: {x: 0, y: 0} });
    		}
    	);
  	</script>
<!-- new -->	

	<script language=javascript> 
		function checkSubmit() 
		{
			var sel1=document.getElementById("sel1").value;
			var sel12=document.getElementById("sel12").value;
			var dispnum=document.getElementById("dispnum").value;
			
			var beginTimes=sel1.split('-');
			var endTimes=sel12.split('-');
			var monthBetweenDate = endTimes[1]-beginTimes[1] + 12 * (endTimes[0]-beginTimes[0]);
			if(sel1=="例如:2010-01-01" || ""==sel1){
				alert("起始时间不能为空。");
				return false;
			}else if(sel12=="例如:2010-12-31" || ""==sel12){
				alert("终止时间不能为空。");
				return false;
			}else if(sel1>sel12){
				alert("开始时间不能大于结束时间。");
				return false;
			}else if(monthBetweenDate > 12){
				alert("设定时间差应小于一年");
				return false;
			}else{
				document.forms[0].submit();
			}
		} 
	</script>
</head>
<body>
	<form name="testForm" action="/ilib/tagCloudSetting.do" method="post" onSubmit="" class="long">
	   <table align="center" border="1" bordercolor="#33FFFF">
	   	<thead>
	   		<tr>
	   			<th align="center" colspan="2">
	   				我的标签云设置
	   			</th>
	   		</tr>
	   	</thead>
		<tr>
		  <td align="center">起始时间:</td>
		  <td align="center">
			  <fieldset>
			  	<input id="sel1" name="dateStart" type="text" value="例如:2010-01-01" />
			  </fieldset>
		  </td>
		</tr>
		<tr>
		  <td align="center">终止时间:</td>
		  <td align="center">
		  		<fieldset>
			  		<input id="sel12" name="dateEnd" type="text" value="例如:2010-12-31"/>
			  	</fieldset>
		  </td>
		</tr>
		<tr>
		   <td align="center">标签显示条数</td>
		   <td align="center">
		   		<fieldset>
			      <select name="dispnum" id="dispnum" onChange=""> 
				    <option value="20">请选择</option> 
				 	<option value="10">10</option>
				 	<option value="20">20</option>
				 	<option value="25">30</option>
			      </select>
		      	</fieldset>
			</td>
		</tr>
		<tr>
		      <td colspan="2" align="center" valign="center">
		      	<input type="hidden" value="myTagCloud" name="module"/>
				<input type="hidden" value="" name="area"/>
				<table><tr>
					<td align="center"><input type="button" value="确定" onclick="return checkSubmit()"/></td>
					<td align="center"><input type="button" value="返回" onClick="javascript:history.go(-1)"></td>
				</tr></table>
		      </td>
		</tr>
	   </table>
	 </form>
	 
</body>
</html>
